package cn.edu.sgu.www.mhxysy.dto.zuoqi;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class ZuoqiDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private String id;

    /**
     * 坐骑名字
     */
    @NotBlank(message = "坐骑名字" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "坐骑名字", required = true)
    private String name;

    /**
     * 角色ID
     */
    @Pattern(regexp = RegExps.ROLE_ID, message = "角色ID" + CustomMessages.ILLEGAL)
    @NotBlank(message = CustomMessages.ROLE_ID_NOT_NULL)
    @ApiModelProperty(value = "角色ID", required = true)
    private String roleId;

    /**
     * 坐骑类型ID
     */
    @Positive(message = "坐骑类型" + CustomMessages.ILLEGAL)
    @NotNull(message = "坐骑类型" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "坐骑类型ID", required = true)
    private Integer categoryId;

    /*
     * 开启状态
     */
    @Range(min = 0, max = 1, message = "开启状态" + CustomMessages.ILLEGAL)
    @NotNull(message = "开启状态" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "开启状态", required = true)
    private Integer openStatus;
}